The V(D)J recombination process that assembles functional immunoglobulin and T cell receptor genes in lymphoid cells is essential for generating the diversity of the immune response. The reaction is now known to occur in two stages. In the first stage, specific double-strand breaks are made at the target sites by the RAG1 and RAG2 proteins acting together. The ends of the coding DNA sequence at these breaks are always joined back on themselves as DNA hairpins. The purified RAG proteins first bind to the recombination site in a "stable cleavage complex" that is highly resistant to competitor DNA. This complex requires both RAG proteins and both halves (heptamer and nonamer) of the recognition sequence. Binding and cleavage can be greatly stimulated by the ubiquitous HMG1 or HMG2 proteins, which are known to bind DNA non specifically and introduce a sharp bend. The reactions of the RAG proteins display chemical similarities to transposition. A stereochemical test showed that hairpins are made by a one step transesterification (like the DNA strand transfers of phage Mu transposase and HIV integrase), without a covalent protein-DNA intermediate, and more recent results have identified a special type of reverse reaction that extends the analogy. The later steps of V(D)J recombination that rejoin the broken ends have also been investigated. This part of the process is known to be relatively non-specific and to share many factors with DNA double-strand break repair. We have recently been able to reconstitute complete V(D)J recombination in a cell-free system. Incubation of a DNA substrate with the RAG proteins, followed by a second incubation with a mammalian cell fraction, leads to the formation of both coding joints and signal joints. The continued presence of the RAG proteins after cleavage is absolutely required for the joining of coding sequences, but inhibits the joining of recognition sequences. The RAG proteins evidently influence the ability of other factors to act on these two types of DNA ends. Coding joints from the cell-free reaction often contain self complementary tracts that arise from the asymmetric opening of hairpin ends (P nucleotides) just like those that are often found in junctions from in vivo recombination. The cell free reaction displays a strong preference for joining at sites of short DNA homologies, but the addition of human DNA ligase I leads to a more diverse set of junctions, similar to those found in vivo. It is possible that different ligases are used for homology-dependent and independent joining.